Skip to content

Fold part 3 to the chosen approach, keep its language tabs in reach - #7

Merged
devmtnaing merged 1 commit into
mainfrom
part3-collapse-sticky-langs
Sep 28, 2026
Merged

devmtnaing merged 1 commit into
mainfrom
part3-collapse-sticky-langs

Conversation

@devmtnaing

Copy link
Copy Markdown
Owner

What this changes

Item 12 from the x-sum UI/UX review. Part 3 was the longest part of every page: 1,582px on x-sum, with every approach's full listing open. The change is in the shared stepper and lesson.css, so all 46 lessons get it.

Stacked on #3–#6. Until those merge, this diff also shows their commits. Merge in order and it shrinks to its own commit.

Solutions fold to the approach you're studying

  • Each solution's heading is now a disclosure button inside the h3 (the standard accordion pattern), with aria-expanded, aria-controls and a chevron.
  • The approach selected in 2·1 starts open, and the others fold down to their heading, badge, description and Copy. Copy still copies a folded solution in full.
  • Choosing another approach in 2·1 also opens its solution, and never closes one the reader opened. A deep link (?approach=heap, Shareable walkthrough links #6) opens that approach's solution.
  • Open/closed state is shared across the five language panes and survives the English/မြန်မာ switch.
  • On x-sum, Part 3 goes from 1,582px to 624px at 1440px wide.

The language tabs stay visible

  • The Part 3 language bar sticks under the masthead until Part 3 ends, so changing language near the bottom of a long listing no longer means scrolling back up.
  • Phones: the tabs stay in one 50px row. Two rows of touch-sized tabs made the sticky bar 94px tall. At about 320px the row scrolls sideways inside itself, and a tab selected from the other row is scrolled into view without moving the page.

Checked

  • npm run check, npm run build, then npm run audit (axe in both themes): passed, 46 pages.
  • A Playwright run on all 46 lessons (every lesson has at least two approaches):
    • Only the chosen approach starts open, and the toggle and the code visibility always agree.
    • Enter opens a solution and Space closes it; the state matches across language panes.
    • Switching approach in 2·1 opens that solution, and the page-language switch keeps the folds.
    • A deep link to an approach opens its solution, and Copy on a folded solution copies the exact listing.
    • Result: 46/46 passed, 0 page errors.
  • Headings, across 184 page states: nothing above Part 3 changed at all. Below it, the only change is the solution titles' auto margin (they're 18px wider with the chevron); font, size, weight, spacing, line height and colour are unchanged.
  • The keyboard, bad-input, deep-link and narrow-width tests from Stepper keys, screen-reader narration and native dark controls #3–Shareable walkthrough links #6 still pass with nothing new.

@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: a78f38c0-e295-4fbe-b917-393974f7a180


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 2ae61bd 2026-09-28T06:26:17.038Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ b382fd8 2026-09-27T03:37:44.873Z Visit the dashboard ↗

- Each part 3 solution's heading is a disclosure button (aria-expanded,
  aria-controls). The approach chosen in 2·1 starts open, the others fold
  to their heading; choosing another approach opens it too. Folds hold
  across the five language panes, a page-language switch and deep links.
  Copy still copies a folded solution.
- The part 3 language tabs stick under the masthead until part 3 ends.
- On phones the language tabs keep to one row (two rows of touch-sized
  tabs made a 94px sticky bar) and scroll sideways only at ~320px, where
  the selected tab is kept in view without moving the page.
@devmtnaing
devmtnaing force-pushed the part3-collapse-sticky-langs branch from b382fd8 to 2ae61bd Compare September 28, 2026 06:24
@devmtnaing
devmtnaing merged commit 757b729 into main Sep 28, 2026
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant